Microsoft Agent and Visual Basic .Net Development

Make a character talk and play out animations

 

3.1: Make a character talk

To make a character talk, first, of course, you must load the character (Chapter 2 shows how to load a character), and then, add this to your code:

 

    Character.Speak("Hello")

 

This code will make the character say “Hello”.

 

3.2 Make a character play out an animation

To make a character play out an animation, first, of course, you need to find out which animations the character has (Chapter 2 shows how to find out which animations a character has), and then, add this to your code:

 

    Character.Play("Sad")

 

It is good to have error handling here because, if the character has the “Sad” animation, the character act sad; if the character doesn’t have the Sad animation, an error will be generated.